/* GUI CONVERTED from rssdtiq.p (converter v1.75) Sat Aug 12 23:16:22 2000 */
/* rssdtiq.p - Supplier Performance code Inquiry                            */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                      */
/* All rights reserved worldwide.  This is an unpublished work.             */
/*                                                                          */
/*V8:ConvertMode=Report                                                     */
/* REVISION 9.0       LAST MODIFIED: 03/12/98  BY: *K1QZ* Pat McCormick     */
/* REVISION 9.0       LAST MODIFIED: 03/13/99  BY: *M0BD* Alfred Tan        */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00  BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00  BY: *N0KP* myb               */


/*                                                                          */
/* -----  W A R N I N G  -----  W A R N I N G  -----  W A R N I N G  -----  */
/*                                                                          */
/*         THIS PROGRAM IS A BOLT-ON TO STANDARD PRODUCT MFG/PRO.           */
/* ANY CHANGES TO THIS PROGRAM MUST BE PLACED ON A SEPARATE ECO THAN        */
/* STANDARD PRODUCT CHANGES.  FAILURE TO DO THIS CAUSES THE BOLT-ON CODE TO */
/* BE COMBINED WITH STANDARD PRODUCT AND RESULTS IN PATCH DELIVERY FAILURES.*/
/*                                                                          */
/* -----  W A R N I N G  -----  W A R N I N G  -----  W A R N I N G  -----  */
/*                                                                          */
/*!
 ----------------------------------------------------------------------------
 DESCRIPTION: Inquiry for supplier shipping standard delivery time(s).

 ============================================================================
 !*/

          /* DISPLAY TITLE  */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

          {mfdtitle.i "b+ "}

          /* FRAME A: SELECTION FORM   */

           
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
             
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
sdt_code          colon 30
             sdt_desc          colon 30
            with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



            /* SET EXTERNAL LABELS */
            setFrameLabels(frame a:handle).

          view frame a.

          /* Web Enabling */
          {wbrp01.i}

          mainloop:
          repeat:

          if c-application-mode <> 'WEB' then

             /* PROMPT-FOR KEYS */
              prompt-for
                  sdt_code
                  with frame a editing:

                  /* FIND NEXT/PREVIOUS RECORD */

                  {mfnp.i sdt_mstr sdt_code sdt_code sdt_code
                                    sdt_code sdt_code}
                  if recno <> ? then
                   display
                       sdt_code
                       sdt_desc
                       with frame a.
              end.  /* prompt-for */

              {wbrp06.i &command = prompt-for &fields = "  sdt_code" &frm = "a"}

              if (c-application-mode <> 'WEB') or
                 (c-application-mode = 'WEB' and
                 (c-web-request begins 'DATA')) then do:

                  /*  VALIDATE KEY  */
                  if input sdt_code = ''
                  then do:
                    {mfmsg.i 40 3} /*BLANK NOT ALLOWED*/
                    undo, retry.
                  end.

                  for first sdt_mstr where
                      sdt_code = input sdt_code
                      no-lock:
                  end. /* for first sdt_mstr */

                  if available sdt_mstr
                  then do:
                       display
                          sdt_desc
                          with frame a.
                  end.
                  else do:
                     {mfmsg.i 4372 3} /* INVALID SDT CODE */
                      next-prompt sdt_code with frame a.
                      undo, retry.
                  end.  /* if not available sdt_mstr */

              end.  /* END - if (c-application-mode <> 'WEB') or */

              /* SELECT PRINTER */
              {mfselprt.i "terminal" 80}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


             ststatus = stline[2].
             status input ststatus.

             if can-find (first sdtd_det where
                        sdt_code = sdtd_code)
             then
                for each sdtd_det
                    where sdtd_code = sdt_code
                    no-lock with frame b width 80
                    no-attr-space down:
                    /* SET EXTERNAL LABELS */
                    setFrameLabels(frame b:handle).
                    
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/

                      display
                           sdtd_time WITH STREAM-IO /*GUI*/ .
                    end. /* for each */
                hide frame b.
                {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/

                {mfmsg.i 8 1}
         end. /* mainloop */

        status input.

        {wbrp04.i &frame-spec = a}
